package com.trj.scaleview;

import com.google.gson.Gson;

import java.util.List;

/**
 * @author TRJ
 * @date 2018/6/21
 * Description:
 */
public class PointData {

    public String pic_url;
    public String pic_index;
    public int pic_width;
    public int pic_height;
    public String pic_format;
    public int scale;
    public List<HotSpotsBean> hot_spots;

    public static class HotSpotsBean {
        public int index;
        public String posno;
        public int pos_x;
        public int pos_y;
        public int reg_w;
        public int reg_h;
        public List<String> group;
    }

    public static PointData map() {
        return new Gson().fromJson(json, PointData.class);
    }

    static String json = "{\n" +
            "    \"pic_url\": \"http://img2.nanxinwang.com/ds/resources/app/vw/v1/746/746103010.png?x-oss-process=style/constrain_jpg\",\n" +
            "    \"pic_index\": \"1\",\n" +
            "    \"pic_width\": 2355,\n" +
            "    \"pic_height\": 2665,\n" +
            "    \"pic_format\": \"image/jpeg\",\n" +
            "    \"scale\": 1,\n" +
            "    \"hot_spots\": [\n" +
            "        {\n" +
            "            \"index\": 0,\n" +
            "            \"posno\": \"3\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1193,\n" +
            "            \"pos_y\": 427,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 1,\n" +
            "            \"posno\": \"5\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1364,\n" +
            "            \"pos_y\": 231,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 2,\n" +
            "            \"posno\": \"7\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 2010,\n" +
            "            \"pos_y\": 959,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 3,\n" +
            "            \"posno\": \"6\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1435,\n" +
            "            \"pos_y\": 229,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 4,\n" +
            "            \"posno\": \"6\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1458,\n" +
            "            \"pos_y\": 1138,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 5,\n" +
            "            \"posno\": \"27\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 180,\n" +
            "            \"pos_y\": 142,\n" +
            "            \"reg_w\": 88,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 6,\n" +
            "            \"posno\": \"2\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 799,\n" +
            "            \"pos_y\": 251,\n" +
            "            \"reg_w\": 59,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 7,\n" +
            "            \"posno\": \"26\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 427,\n" +
            "            \"pos_y\": 274,\n" +
            "            \"reg_w\": 88,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 8,\n" +
            "            \"posno\": \"2\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1478,\n" +
            "            \"pos_y\": 532,\n" +
            "            \"reg_w\": 59,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 9,\n" +
            "            \"posno\": \"25\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 444,\n" +
            "            \"pos_y\": 882,\n" +
            "            \"reg_w\": 88,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 10,\n" +
            "            \"posno\": \"22\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 599,\n" +
            "            \"pos_y\": 1182,\n" +
            "            \"reg_w\": 87,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 11,\n" +
            "            \"posno\": \"23\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 438,\n" +
            "            \"pos_y\": 1346,\n" +
            "            \"reg_w\": 88,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 12,\n" +
            "            \"posno\": \"20\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 704,\n" +
            "            \"pos_y\": 1431,\n" +
            "            \"reg_w\": 87,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 13,\n" +
            "            \"posno\": \"4\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1275,\n" +
            "            \"pos_y\": 231,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 14,\n" +
            "            \"posno\": \"24\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 250,\n" +
            "            \"pos_y\": 1344,\n" +
            "            \"reg_w\": 87,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 15,\n" +
            "            \"posno\": \"1\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1240,\n" +
            "            \"pos_y\": 128,\n" +
            "            \"reg_w\": 50,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 16,\n" +
            "            \"posno\": \"11\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1578,\n" +
            "            \"pos_y\": 1066,\n" +
            "            \"reg_w\": 74,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 17,\n" +
            "            \"posno\": \"21\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 959,\n" +
            "            \"pos_y\": 1152,\n" +
            "            \"reg_w\": 81,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 18,\n" +
            "            \"posno\": \"12\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1358,\n" +
            "            \"pos_y\": 1282,\n" +
            "            \"reg_w\": 84,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 19,\n" +
            "            \"posno\": \"10\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1465,\n" +
            "            \"pos_y\": 1311,\n" +
            "            \"reg_w\": 84,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 20,\n" +
            "            \"posno\": \"15\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1486,\n" +
            "            \"pos_y\": 1642,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 21,\n" +
            "            \"posno\": \"13\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 2019,\n" +
            "            \"pos_y\": 1719,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 22,\n" +
            "            \"posno\": \"14\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1621,\n" +
            "            \"pos_y\": 1729,\n" +
            "            \"reg_w\": 84,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 23,\n" +
            "            \"posno\": \"17\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 602,\n" +
            "            \"pos_y\": 1782,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 24,\n" +
            "            \"posno\": \"16\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 766,\n" +
            "            \"pos_y\": 2120,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 73\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 25,\n" +
            "            \"posno\": \"9\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1661,\n" +
            "            \"pos_y\": 1448,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 26,\n" +
            "            \"posno\": \"19\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1448,\n" +
            "            \"pos_y\": 2447,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 27,\n" +
            "            \"posno\": \"8\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1691,\n" +
            "            \"pos_y\": 995,\n" +
            "            \"reg_w\": 60,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 28,\n" +
            "            \"posno\": \"18\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1449,\n" +
            "            \"pos_y\": 2356,\n" +
            "            \"reg_w\": 85,\n" +
            "            \"reg_h\": 72\n" +
            "        },\n" +
            "        {\n" +
            "            \"index\": 29,\n" +
            "            \"posno\": \"15A\",\n" +
            "            \"group\": [],\n" +
            "            \"pos_x\": 1375,\n" +
            "            \"pos_y\": 1663,\n" +
            "            \"reg_w\": 120,\n" +
            "            \"reg_h\": 73\n" +
            "        }\n" +
            "    ]\n" +
            "}";

}
